﻿//-----------------------------------------------------------------------
// <copyright file="HelloWorldRESTService.cs" company="$registeredorganization$">
// Copyright © $registeredorganization$
// </copyright>
//-----------------------------------------------------------------------
namespace $originalprojectname$.Client
{
    using System;  
    using System.ServiceModel;
    using System.ServiceModel.Activation;
    using Microsoft.SharePoint.Administration;
    using $originalprojectname$.Service;

    /// <summary>
    /// The REST Service.
    /// </summary>
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)]
    [System.Runtime.InteropServices.Guid("$restserviceguid$")]
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1812:AvoidUninstantiatedInternalClasses", Justification = "Instantiated by the WCF runtime automatically.")]
    public class HelloWorldRESTService : IHelloWorldRESTService
    {
        /// <summary>
        /// Returns a hello world string.
        /// </summary>
        /// <param name="helloWorld">An input string of text.</param>
        /// <returns>A string of text echoing the input value.</returns>
        public string HelloWorld(string helloWorld)
        {
            HelloWorldServiceClient client = new HelloWorldServiceClient();
            return client.HelloWorld(helloWorld);
        }$if$ ($includedb$ == true)

        /// <summary>
        /// Returns a hello world string from the database.
        /// </summary>
        /// <param name="helloWorld">An input string of text.</param>
        /// <returns>A string of text echoing the input value.</returns>
        public string HelloWorldFromDatabase(string helloWorld)
        {
            HelloWorldServiceClient client = new HelloWorldServiceClient();
            return client.HelloWorldFromDatabase(helloWorld);
        }$endif$
    }
}
